set cwd=%~dp0

set dist=%cwd%..\etc\datax
rmdir /s /q %dist%
mkdir %dist%
mkdir %dist%\eureka\ %dist%\config\ %dist%\auth\ %dist%\gateway\
mkdir %dist%\system\ %dist%\quartz\ %dist%\workflow\
mkdir %dist%\metadata\ %dist%\console\
mkdir %dist%\standard\ %dist%\quality\
mkdir %dist%\market\ %dist%\mapping\ %dist%\integration\
mkdir %dist%\masterdata\ %dist%\visual\

pushd ..\..\..\datax-cloud

copy datax-eureka\src\main\resources\bootstrap.yml %dist%\eureka\
copy datax-config\src\main\resources\bootstrap.yml %dist%\config\
copy datax-auth\src\main\resources\bootstrap.yml %dist%\auth\
copy datax-gateway\src\main\resources\bootstrap.yml %dist%\gateway\

xcopy /s /i datax-config\src\main\resources\config\ %dist%\config\config\

copy datax-modules\system-service-parent\system-service\src\main\resources\bootstrap.yml %dist%\system\
copy datax-modules\quartz-service-parent\quartz-service\src\main\resources\bootstrap.yml %dist%\quartz\
copy datax-modules\workflow-service-parent\workflow-service\src\main\resources\bootstrap.yml %dist%\workflow\

copy datax-modules\data-metadata-service-parent\data-metadata-service\src\main\resources\bootstrap.yml %dist%\metadata\
copy datax-modules\data-metadata-service-parent\data-metadata-service-console\src\main\resources\bootstrap.yml %dist%\console\

copy datax-modules\data-standard-service-parent\data-standard-service\src\main\resources\bootstrap.yml %dist%\standard\
copy datax-modules\data-quality-service-parent\data-quality-service\src\main\resources\bootstrap.yml %dist%\quality\

copy datax-modules\data-market-service-parent\data-market-service\src\main\resources\bootstrap.yml %dist%\market\
copy datax-modules\data-market-service-parent\data-market-service-mapping\src\main\resources\bootstrap.yml %dist%\mapping\
copy datax-modules\data-market-service-parent\data-market-service-integration\src\main\resources\bootstrap.yml %dist%\integration\

copy datax-modules\data-masterdata-service-parent\data-masterdata-service\src\main\resources\bootstrap.yml %dist%\masterdata\
copy datax-modules\data-visual-service-parent\data-visual-service\src\main\resources\bootstrap.yml %dist%\visual\

pause